//
//  CardPaymentController.m
//  Wisdom Bank
//
//  Created by rimi on 15/10/10.
//  Copyright (c) 2015年 wlc. All rights reserved.
//  卡缴费服务

#import "CardPaymentController.h"

@interface CardPaymentController ()

@end

@implementation CardPaymentController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor blackColor];
    
    UIImageView *backgroundImageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"灰色背景.png"]];
    CGFloat w = self.view.frame.size.width;
    CGFloat h = self.view.frame.size.height - 83;
    backgroundImageView.frame = CGRectMake(0, 0, w, h);
    [self.view addSubview:backgroundImageView];
    
    NSArray *arrImage = @[@"按罚单查询1.png",@"按牌照查询1.png",@"按驾档编号查询1.png"];
    for (int i = 0; i < arrImage.count; i++) {
        UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
        [btn setImage:[UIImage imageNamed:arrImage[i]] forState:UIControlStateNormal];
        btn.frame = CGRectMake(186, 130 + i  * (118 + 30), 320, 118);
        btn.tag = i;
        [btn addTarget:self action:@selector(respondsToQueryBtn:) forControlEvents:UIControlEventTouchUpInside];
        [self.view addSubview:btn];
    }
}

- (void)respondsToQueryBtn:(UIButton *)sender{
    switch (sender.tag) {
        case 0:
            NSLog(@"按罚单查询");
            break;
        case 1:
            NSLog(@"按拍照查询");
            break;
        case 2:
            NSLog(@"按编号查询");
            break;
        default:
            break;
    }

}


- (void)dealloc{

    NSLog(@"畅通卡缴费被销毁了！");
}

@end
